//
//  Dimensional_UploadViewController.m
//  fxxiaoke
//
//  Created by 褚夫银 on 16/9/21.
//  Copyright © 2016年 jc. All rights reserved.
//

#import "Dimensional_UploadViewController.h"

@interface Dimensional_UploadViewController () <UIScrollViewDelegate>

@property (nonatomic, strong) UIScrollView * scrollView;

@property (nonatomic, strong) UIImageView * image_Dimensional;

@end

@implementation Dimensional_UploadViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self p_navi];
    
    [self p_setupView];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - navi
- (void )p_navi
{
    _btnLeft.hidden = YES;
    _lblLeft.hidden = YES;
    _btnRight.hidden = YES;
    _lblRight.hidden = YES;
    
    _lblTitle.text = @"扫二维码下载客户端";
    
    //左返回
    UIImageView * image_LeftRetrun = [[UIImageView alloc] initWithFrame:CGRectMake(11, 31.5, 25, 25)];
    image_LeftRetrun.userInteractionEnabled = YES;
    image_LeftRetrun.image = [UIImage imageNamed:@"Left-return.png"];
    [_topView addSubview:image_LeftRetrun];
    
    UILabel * lbl_return = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(image_LeftRetrun.frame) - 6, 35, 35, 15)];
    lbl_return.text = @"返回";
    lbl_return.textColor = [UIColor whiteColor];
    lbl_return.font = [UIFont systemFontOfSize:17];
    [_topView addSubview:lbl_return];
    
    UIButton * btn_return = [UIButton buttonWithType:(UIButtonTypeSystem)];
    btn_return.frame = CGRectMake(10, 22, 60, 40);
    [_topView addSubview:btn_return];
    [btn_return addTarget:self action:@selector(btn_returnAction:) forControlEvents:(UIControlEventTouchUpInside)];
}

//左返回
- (void )btn_returnAction:(UIButton *)sender
{
    [self.navigationController popViewControllerAnimated:YES];
}

//显示tabbar
- (void )viewWillAppear:(BOOL)animated
{
    [(AppDelegate *)[[UIApplication sharedApplication] delegate] hiddenTabBar];
}

#pragma mark - 布局
- (void )p_setupView
{
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 64, SCREEN_WIDTH, SCREEN_HEIGHT - 64)];
    self.scrollView.backgroundColor = [UIColor whiteColor];
    self.scrollView.showsVerticalScrollIndicator = NO;
    self.scrollView.contentSize = CGSizeMake(0, SCREEN_HEIGHT - 60);
    self.scrollView.delegate = self;
    [self.view addSubview:self.scrollView];
    
    CGFloat length_x = (SCREEN_HEIGHT - 64 - SCREEN_WIDTH / 2) / 2;
    
    self.image_Dimensional = [[UIImageView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH / 4, length_x - 50, SCREEN_WIDTH / 2, SCREEN_WIDTH / 2)];
//    self.image_Dimensional.backgroundColor = [UIColor orangeColor];
    self.image_Dimensional.image = [UIImage imageNamed:@"Timg_pic.jpg"];
    [self.scrollView addSubview:self.image_Dimensional];
    
    
    UILabel * lbl_detail = [[UILabel alloc] initWithFrame:CGRectMake(15, CGRectGetMaxY(self.image_Dimensional.frame) + 30, SCREEN_WIDTH - 30, 20)];
    lbl_detail.text = @"扫一扫下载纷享销客客户端";
    lbl_detail.textAlignment = NSTextAlignmentCenter;
    lbl_detail.font = [UIFont systemFontOfSize:19.0f];
    [self.scrollView addSubview:lbl_detail];
}













@end
